//
// File  : Flight.h
// Team  : Dangling Pointers
// Class : CST236 - Software Testing
//
// Header file for the Flight class. Flight
// represents Flight information data to be
// added to flight database.
//

#ifndef FLIGHT_H
#define FLIGHT_H

#include <map>
#include <string>
#include <vector>


typedef std::map<int, std::string> SeatingChart;
typedef std::map<int, std::string>::iterator SeatingChartIter;
typedef std::map<int, std::string>::const_iterator SeatingChartIterC;

class Flight
{	
public:

	// enumeration representing flight status
	enum Status { ONTIME, DELAYED, CANCELLED };

	// define the maximum number of seats per plane
	static const int    MAX_SEATS = 5;

	// constructor
	Flight(const std::string&, const std::string&, const std::string&, Status);

	// getters
	const std::string&  getFlightNumber() const;
	const std::string&  getDepartureTime() const;
	const std::string&  getArrivalTime() const;
	int                 getNumPassengers() const;
	int                 getFirstClassCount() const;
	int                 getCoachClassCount() const;
	Status              getFlightStatus() const;

	// setters
	void                setFlightNumber(const std::string&);
	void                setDepartureTime(const std::string&);
	void                setArrivalTime(const std::string&);
	void                setFlightStatus(Status);
	void                addFirstClassSeat(const std::string&);
	void                addCoachClassSeat(const std::string&);
	bool                removeFirstClassSeat(const std::string&);
	bool                removeCoachClassSeat(const std::string&);
	void                initializeSeatingChart();

	// print()
	void                print() const;
	void                printFirstClassSeats() const;
	void                printCoachClassSeats() const;

private:

	std::string         m_flightNumber;
	std::string         m_departureTime;
	std::string         m_arrivalTime;
	Status              m_flightStatus;
	SeatingChart        m_firstClass;
	SeatingChart        m_coachClass;
	int                 m_numPassengers;
	int                 m_coachCount;
	int                 m_fcCount;

};

#endif 
